package com.neusoft.demo1;

import java.util.Scanner;

/**
 * 二选一
 *  if() {
 *
 *  }else {
 *
 *  }
 */
public class ControllerDemo2 {
    public static void main(String[] args) {
    //        Scanner input  = new Scanner(System.in);
    //        System.out.println("请输入成绩: ");
    //        int score = input.nextInt();
    //        if(score >= 90) {
    //            System.out.println("优秀......");
    //        }else {
    //            System.out.println("补考......");
    //        }
    //        System.out.println("over......");

            Scanner input = new Scanner(System.in);
            System.out.println("请输入会员的积分: ");
            int score = input.nextInt();
            double discount;
            if (score < 2000) {
                 discount = 0.9;
            }else if (score >= 2000 && score < 4000) {
                 discount = 0.8;
            }else if (score >= 4000 && score < 8000) {
                 discount = 0.7;
            }else {
                 discount = 0.6;
            }
            System.out.println("会员的折扣是: " + discount);
        }

    }

